{% extends '__base.tpl' %}

{% block head %}
{{super()}}
<!-- build:css -->
    <link rel="stylesheet" type="text/css" href="../../../public/css/page/userCart.css" />
    <link rel="stylesheet" type="text/css" href="../../../public/css/page/popup.css" />
<!-- endbuild -->
{% endblock %}

{% block body %}
<div id="box">
    <div class="cart-box">
        <div class="submit-title">
            <span class="font24">订单支付</span>
            <a href="javascript:;" onclick="$('#rulus').show()" class="font12 blue u ml10">现金券领取规则</a>
        </div>
        <div id="submitData"></div>
        <script id="submitData_tpl" type="text/html">
            <div class="submit-order-number">
                订单号：<%data.id%>
            </div>
            <!--提交订单商品列表start-->
            <%if data.flag == 1%>
            <div class="cart-content fontb font16">
                请到 IOS 支付
            </div>
            <%else%>
            <div class="cart-content">
                <table>
                    <tbody>
                    <tr class="checked">
                        <td width="60%" class="relative">
                            <span class="cart-goods-title">
                            <%data.productName%>
                            <%if data.productDescript%>
                                <%data.productDescript%></span>
                            <%/if%>
                            </span>
                        </td>
                        <td align="center" width="40%"><span class="orange">
                             <%if data.realPrice>=0 && data.supportPays_rmb %>
                             <span id="goodsPrice">
                                 &yen;<%data.realPrice%>
                             </span>
                            <%/if%>
                            <%if data.supportPays_gold%>
                                <span id="goodsGold">
                                    <%if data.realGold>=0 && data.realPrice>=0 && data.supportPays_rmb%>/<%/if%>
                                    <%if data.realGold>=0%>
                                        金币<%data.realGold%>
                                    <%/if%>
                                </span>
                            <%/if%>
                        </span>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <!--提交订单商品列表end-->
            <!--支付方式start-->
            <div class="pay-type-box">
                <div>支付方式</div>
                <ul class="pay-type-ul" id="payType">
                    <%if data.supportPays_rmb %>
                        <%if data.realPrice>0 %>
                            <li class="pay-type-item rmb <%if data.paystyle == 'weixin'%> checked <%/if%>"
                                data-paystyle="weixin" data-supportpays="rmb">
                                <img src="../../public/images/pay1.png" alt="weixin">
                                微信支付
                            </li>
                            <li class="pay-type-item rmb <%if data.paystyle == 'alipay'%> checked <%/if%>" data-paystyle="alipay" data-supportpays="rmb">
                                <img src="../../public/images/pay3.png" alt="yue">
                                支付宝支付
                            </li>
                        <%/if%>
                        <%if data.flag!=2%>
                        <li class="pay-type-item rmb <%if data.paystyle == 'fund'%> checked <%/if%>" data-paystyle="fund" data-supportpays="rmb">
                            <img src="../../public/images/pay2.png" alt="apliy">
                            余额支付
                        </li>
                        <%/if%>
                    <%/if%>
                    <%if data.supportPays_gold %>
                    <li class="pay-type-item gold <%if data.paystyle == 'gold'%> checked <%/if%>" data-paystyle="gold" data-supportpays="gold">
                        <img src="../../public/images/pay2.png" alt="apliy">
                        金币支付
                    </li>
                    <%/if%>
                </ul>
            </div>
            <!--支付方式end-->
            <div class="submit-bottom">
                <%if data.supportPays_rmb %>
                <label for="tick">
                    <input type="checkbox" id="tick"  <%if data.useTicket %> checked="checked" <%/if%> class="checkbox"
                           data-canUseTick="<%data.canUseTick%>">
                    使用现金券
                </label>
                <span>
                    可用现金券<span class="orange"><%data.canUseTick%></span>张,
                    账户现金券<span class="orange"><%data.usercashTick%></span>张
                </span>
                <%/if%>
                <div class="fright">
                    <span class="total-price">
                        总计金额<br/>
                        <span class="font24 orange">
                            <%if data.realPrice>=0 && data.supportPays_rmb %>
                             <span id="totalPrice">
                                 <%if data.useTicket%>
                                 &yen;<%data.realPrice-data.canUseTick%>
                                 <%else%>
                                 &yen;<%data.realPrice%>
                                 <%/if%>
                             </span>
                            <%/if%>
                            <%if data.supportPays_gold%>
                                <span id="totalGold">
                                    <%if data.realGold>=0 && data.realPrice>=0 && data.supportPays_rmb%>/<%/if%>
                                    <%if data.realGold>=0%>
                                        金币<%data.realGold%>
                                    <%/if%>
                                </span>
                            <%/if%>
                        </span>
                    </span>
                    <button class="common-btn" onclick="BASE.USER_SUBMITORDER.submitOrder(this)">支付</button>
                </div>
            </div>
            <%/if%>
        </script>
    </div>
    <!--微信支付扫一扫-->
    <div id="weixinPayShow" class="popup" style="display: none">
        <div class="popupBody">
            <div class="popupDiv1">
                <b>微信支付</b>
               <!-- <i class="pointer" onclick="$('#weixinPayShow').hide()">
                    <img src="../../../public/images/close.jpg">
                </i>-->
            </div>
            <div class="center">
                <div id="weixinCode" ></div>
                <img src="../../../public/images/phone_scane.png" alt="phone">
            </div>
        </div>
    </div>
    <!--支付成功或释放-->
    <div id="payStatus" class="popup" style="display: none">
        <div class="popupBody center" style="padding-top: 30px;">
            <img class="img-success hide" src="../../../public/images/success_theme.gif" alt="success">
            <img class="img-err hide" src="../../../public/images/err_theme.png" alt="success">
            <p class="font24 fontb" id="payTips">支付成功</p>
            <div class="mt30">
                <a class="btnBlueM" href="/">返回主页</a>
                <a class="btnStyleBlue ml30" href="javascript:;" onclick="BASE.USER_SUBMITORDER.historyBack()">返回下单页</a>
            </div>
        </div>
    </div>
    <!--现金券规则-->
    <div id="rulus"  class="popup" style="display: none">
        <div class="popupBody">
            <div class="popupDiv1">
                <b>现金券规则</b>
                <i class="pointer" onclick="$('#rulus').hide()">
                    <img src="../../../public/images/close.jpg">
                </i>
            </div>
            <div class="mt20" style="padding:0 50px;">
                1、现金券规则：以爱达人公司规则为准，拥有最终解释权；<br/>
                2、仅限：爱达人注册用户使用；<br/>
                2、发放：个人中心-赚金币-送现金券点击分享，可以分享送好友，每天同一好友送一次；<br/>
                3、领取：现金券可以从爱达人其他用户处领取，每周仅限领取一次；<br/>
                4、现金券不可以兑换，买卖，不等于有价物，不得恶意囤积谋利；<br/>
                5、不当获取或者非法使用现金券，爱达人公司有权采取必要措施维护自身合法权益，包括但不限于取缔，封号，冻结，罚没等处罚措施；<br/>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block script %}
    {{ super() }}
<!-- build:js -->
    <script src="../../../public/js/page/user/jquery.qrcode.min.js"></script>
    <script src="../../../public/js/page/user/user_submitOrder.js"></script>
<!-- endbuild -->
{% endblock %}
